<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script>
        var obj = {
            name:"国哥",
            age:18,
            fun : function () {
                alert(this.name + "," +this.age);
            }
        }

        obj.fun();
    </script>
</head>
<body>

</body>
</html>